<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-form ref="form" :model="s_set" :rules="rules" label-width="100px" id="mvcfm">
      <el-button @click="gotoPage(''+vueparams+'')" type='success' size="mini"><i class='fa fa-plus'></i>增加盘存任务</el-button>
      <div class="form-unit">
        <span class="mvc-title-left"> 列表 </span>
      </div>
      <el-table :data="s_set">
        <el-table-column label="#" align="center" type='index'>
        </el-table-column>
        <el-table-column label="仓库" prop="">
        </el-table-column>
        <el-table-column label="盘存方式" prop="set_id">
          <template slot-scope="scope">
            <el-link @click="gotoPage('/psi/supplychainmana/InventoryListUp?CMIDset_id='+scope.row.set_id+''+vueparams+'')" type='primary'>{{scope.row.set_way}}</el-link>
          </template>
        </el-table-column>
        <el-table-column label="盘存时间" prop="">
        </el-table-column>
        <el-table-column label="盘存时间" prop="">
        </el-table-column>
        <el-table-column label="盘存要求" prop="">
        </el-table-column>
        <el-table-column label="设置人" prop="contact_name">
        </el-table-column>
        <el-table-column label="设置时间" prop="entered">
        </el-table-column>
        <el-table-column label="状态" prop="state">
          <template slot-scope="scope">
            {{getValueName("未设置=0,已设置=1",scope.row.state)}}
          </template>
        </el-table-column>
        <el-table-column label="操作" prop="">
          <template slot-scope="scope">
            <el-link @click="gotoPage('/psi/supplychainmana/InventoryMateriel?'+vueparams+'')" type='primary'>{{scope.row['']}}</el-link>
          </template>
        </el-table-column>
      </el-table>
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'WarehouseList',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_set: [],
        loading: false,
        rules: {}
      }
    },
    created() {
      this.getData();
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/psi/supplychainmana/WarehouseAction/warehouseList?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
